#ifndef SERVER_H
#define SERVER_H

#include "global.h"
#include "event/eventtransfer.h"
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>

class Server :
        public EventTransfer,
        protected boost::noncopyable
{
public:
    typedef boost::shared_ptr< Server > Ptr;

public:
    Server();
    ~Server();

    // Factory function, create a smart pointer object
    // package by boost::shared_ptr
    static Ptr get();

public:
    int start(int argc, char **argv);
protected:
    bool parseCommandLine(int argc, char **argv);
    bool init();
    int  run();
};

#endif // SERVER_H
